package java_class_work.week05;

import java.io.*;

/**
 * @Auther: admin
 * @Date: 2022/10/11 10:13
 * @Description: Writer类写入，字符流  FileWriter
 */
public class WriterDemo {
    public static void main(String[] args) {
        String fileName = ".\\src\\java_class_work\\iotest\\writer.txt";
        Writer writer = null;
        try {
            writer = new FileWriter(fileName, true);
            String content = "是海洋的倒影--";
            writer.write(content);
        } catch (IOException e) {
            e.printStackTrace();
        } finally {
            try {
                if (writer != null) writer.close();
            } catch (IOException e) {
                e.printStackTrace();
            }
        }

    }
}
